<?php load_header() ?>
<?php #content ?>
<div class="row">
	<div class="action-tools container-fluid">
		<div class="page-header">My Service</div>
		<div class="pull-right">
			<?php echo anchor(PANEL_URL . '/service/show_create_form', 'New', 'class="btn btn-primary"') ?>
		</div>
	</div>
	<div class="container-fluid">

		<table class="table table-condensed table-hover">
			<thead>
				<tr>
					<th>Action</th>
					<th>Name</th>
					<th>Price</th>
					<th style="max-width:100px">Serve Time(Day)</th>
					<th>Description</th>
					<th style="max-width:50px">Status</th>
				</tr>
			</thead>
			<tbody>
				<?php foreach ($service_list->result() as $i => $row): ?>
				<tr>
					<td>
						<?php
							echo anchor(PANEL_URL.'/service/show_edit_form/'.$row->service_id,
										'<i class="fa fa-edit"></i>');
							echo nbs(2);
							echo anchor(PANEL_URL.'/service/delete/'.$row->service_id,
										'<i class="fa fa-trash"></i>');
						?>
					</td>
					<td><?php echo $row->service_name; ?></td>
					<td><?php echo $row->price; ?></td>
					<td><?php echo $row->serve_time . ($row->serve_time > 1) ? 'Days' : 'Day'; ?></td>
					<td><?php echo $row->description; ?></td>
					<td class="center"><?php echo ($row->enable == 1) ? 'Enabled' : 'Disabled'; ?></td>
				</tr>
				<?php endforeach ?>
			</tbody>
		</table>
	</div>
</div>
<?php load_content_footer(); ?>
<?php load_footer(); ?>
